/**
 * 遍历树形结构
 * @param node 
 * @param callback 
 */
export function traverseTree(node: any, callback: (node: any) => void) {
    // 先处理当前节点
    callback(node);

    // 遍历子节点
    node.children.forEach((child: any) => traverseTree(child, callback));
}

